@extends('admin.layout.app')
@section('title', '操作结果')

@section('nav')

@endsection

@section('content')
    <div class="box" style="min-height: 300px;">
        <div class="box-header with-border">

        </div>
        <!-- /.box-header -->
        <div class="box-body">
            <div style="text-align: center;">
                @if($type == 1)
                    <h3>
                        <i class="fa fa-fw fa-check-circle" style="font-size: 2em;color: #4CAF50;"></i>
                    </h3>
                    <h3 style="text-align: center;">
                        {{$title}}
                    </h3>
                    <p >{{$message}}</p>
                @else
                    <h3>
                        <i class="fa fa-fw fa-exclamation-circle" style="font-size: 2em;color: red;"></i>
                    </h3>
                    <h3 style="text-align: center;">
                        {{$title}}
                    </h3>
                    <p >{{$message}}</p>

                @endif
                    <p><span id="timer">{{$second}}</span>秒后页面自动跳转...</p>
            </div>

        </div>

        <div class="box-footer clearfix">

        </div>
    </div>
@endsection

@section('style')
    <style>

    </style>
@endsection

@section('js')
    <script>
        $(function () {
            var count = "{{$second}}";
            var url = "{{$url}}";
            if(url == ""){
                url = '/';
            }

            var timer = setInterval(function(){
                count--;
                $('#timer').text(count);
                if(count == 1){
                    window.location.href = url;
                }
            }, 1000);
        })
    </script>
@endsection